package com.evil.application.pojo.dto.reporting.data.list;

import com.evil.application.pojo.dto.order.OrderPageReqDTO;
import com.evil.application.pojo.dto.view.config.filter.query.FilterGroupQueryReqDTO;
import com.evil.common.core.entity.PageModel;
import lombok.Data;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 报表 数据表请求实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
public class ReportingDataListReqDTO {

    @NotBlank(message = "报表key不能为空")
    private String reportingKey;

    /**
     * 查询条件类型(0-精确查询, 1-模糊查询)
     */
    private Integer queryType;

    /**
     * 精确、模糊筛选
     */
    @Valid
    private List<AccurateQueryReqDTO> accurateQueries;

    /**
     * 筛选查询
     */
    @Valid
    private List<FilterGroupQueryReqDTO> filterQuery;

    /**
     * 订单列表查询条件
     */
    @NotNull(message = "查询条件参数不能为空")
    private PageModel<OrderPageReqDTO> pageModel;

    public ReportingDataListReqDTO() {
        this.accurateQueries = new ArrayList<>();
        this.filterQuery = new ArrayList<>();
    }
}
